use apikit::rpc::{DutyClient, ServerAddressManager};
use reqwest::Client;

pub struct ClientManager;

impl ServerAddressManager for ClientManager {
    fn get_server_addr(&self, _name: &str) -> &str {
        "http://localhost:9030"
    }
}

impl ClientManager {
    pub fn get_client<T: DutyClient<Client, Self>>() -> T {
        T::new(Client::new(), ClientManager)
    }
}
